﻿using System;
using System . Collections . Generic;
using System . Linq;
using System . Text;
using System . Xml . Linq;
using System . IO;
using System . Threading . Tasks;
using System . Xml;
using System . Reflection;

namespace GameClassLibrary
{
    static class ResourceHelper
    {
        public static XDocument GetXmlDocument ( string fileName )
        {
            Assembly assembly = Assembly.GetExecutingAssembly();

            Stream stream = assembly.GetManifestResourceStream( fileName );

            StreamReader reader=new StreamReader ( stream );

            XDocument Doc= XDocument . Parse ( reader . ReadToEnd ( ) );

            return Doc;

        }
    }
}
